Skip to content

Conversation

@ThOrtmann
Copy link
Collaborator

@ThOrtmann ThOrtmann commented May 13, 2024

Closes #692, #697, #599

Major refactoring of Elterngeld, introducing some new parameters.

What problem do you want to solve?

Updating the Functions of the Elterngeld to better reflect the BEEG

ThOrtmann and others added 23 commits May 13, 2024 10:41
I have introduced some basic changes to better reflect the BEEG. These include a rework of some functions, as well as a new function
Added
    - elterngeld_nettolohn_vorj
    - zu_verst_eink-mit_kinderfreib_tu
    - arbeitsstunden_w
    - hat_kinder
    - Alleinerz
as basic inputs and
   - elterngeld_anspruch
as an output
Updated the Elterngeld_nettolohn_vorj_m variable name
Added
    - elterngeld_nettolohn_vorj_m
    - zu_verst_eink-mit_kinderfreib_tu
    - arbeitsstunden_w
    - hat_kinder
    - Alleinerz
as basic inputs and
   - elterngeld_anspruch
as an output
Attempted to adapt this Test to correctly interact with the reworked Elterngeld tests by implementing the elterngeld_nettolohn_vorj_m and zu_verst_eink_mit_kinderfreib_tu variables
Fixing errors regarding quotation marks and comma
Added
    - elterngeld_nettolohn_vorj_m
    - zu_verst_eink-mit_kinderfreib_tu
    - arbeitsstunden_w
    - hat_kinder
    - Alleinerz
as basic inputs and
   - elterngeld_anspruch
as an output
removed elterngeld_nettolohn_vorj_m and zu_verst_eink_mit_kinderfreib_tu
updated elterngeld_anspruch
Added max_einkommen_allein und max_einkommen_zsm to the Elterngeldparameters
updated einkommensbezugsgrenzen
updated the elterngeld_anspruch func
Updates some_elterngeld_fixes branch
Updates the functions
Updates the Tests
correctly compute the full_taxes_and_transfers tests
@codecov
Copy link

codecov bot commented May 30, 2024

Codecov Report

Attention: Patch coverage is 98.50746% with 1 line in your changes missing coverage. Please review.

Project coverage is 90.04%. Comparing base (5d81581) to head (0892ca6).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/_gettsim/transfers/elterngeld.py 98.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #756      +/-   ##
==========================================
+ Coverage   89.99%   90.04%   +0.05%     
==========================================
  Files          53       53              
  Lines        3857     3878      +21     
==========================================
+ Hits         3471     3492      +21     
  Misses        386      386              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@JakobWegmann JakobWegmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Impressive work! I only have some minor detail questions.

Copy link
Collaborator

@hmgaudecker hmgaudecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@JakobWegmann
Copy link
Collaborator

One more general question: As parental leave benefit is calculated based on the state of the law at January 1st for the year of the respective claim, changes to the law that take place during the year (in the last years this happens regularly for the lohnsteuer), should not influence the calculation of parental leave benefit. Is this implementable/implemented?

@hmgaudecker
Copy link
Collaborator

One more general question: As parental leave benefit is calculated based on the state of the law at January 1st for the year of the respective claim, changes to the law that take place during the year (in the last years this happens regularly for the lohnsteuer), should not influence the calculation of parental leave benefit. Is this implementable/implemented?

As long as only net income is concerned, see the discussion above. Else, we should make an issue for that, link from the docstring and if somebody needs that amount of detail, implement it!

Copy link
Collaborator

@hmgaudecker hmgaudecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add the discussion on timings / running GETTSIM more than once somewhere so that it does not get lost. Maybe a page in the docs and link from docstrings of elterngeld_m and elterngeld_nettolohn_approximation_m, description of input variable elterngeld_nettoeinkommen_vorjahr_m ?

@MImmesberger
Copy link
Collaborator

MImmesberger commented Sep 10, 2024

@hmgaudecker Can you have a final look over the tutorial notebook. The warnings of the GETTSIM call outputs are present in all notebooks (issue #757),

Copy link
Collaborator

@hmgaudecker hmgaudecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The notebook is a very nice addition! I think, however, we should be very precise there. Not fully sure whether that is the case just yet!

"information from step 2.\n",
"\n",
"The reason for not doing this in one GETTSIM call (together with step 2) is that \n",
"1. the correct policy date of the net wage calculation (step 2) is always January 1st of\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought @JakobWegmann linked a law/directive saying that the parameters throughout the larger part of the year before birth mattered? So for a kid born in March, it would be 2023. For a kid born in November, 2024? Again, I'd argue for keeping our the standard approximation using the previous year, but we should be precise here, also for our own sanity when reading it down the road.

Copy link
Collaborator

@MImmesberger MImmesberger Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One law, three different interpretations 😅

§2e BEEG Abs. 1 Satz 2:

Die Abzüge für Steuern werden einheitlich für Einkommen aus nichtselbstständiger und selbstständiger Erwerbstätigkeit auf Grundlage einer Berechnung anhand des am 1. Januar des Kalenderjahres vor der Geburt des Kindes für dieses Jahr geltenden Programmablaufplans [...] ermittelt.

My interpretation is that the relevant parameters are the ones of the year before (i.e. child born in December 2024, parameters of January 1st 2023 are considered). I'll adjust the notebook accordingly, but intervene if you understand the law differently.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be my interpretation of the text, too! @JakobWegmann, could you weigh in one last time?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, 1st of January of the calendar year before birth is correct (no matter the birth month).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought @JakobWegmann linked a law/directive saying that the parameters throughout the larger part of the year before birth mattered?

For the sake of completeness: That was about the input values of the function, so Steuerklasse, place of residence, church tax,...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, if all of you (@MImmesberger @JakobWegmann and maybe also @pia-molitor ?) could just read through the notebook text and fix any errors in my summary (+maybe add a link to the application form, Jakob?), we'll be good to go!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No complaints from my side.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good!

A direct link to a PDF: https://www.zbfs.bayern.de/imperia/md/content/zbfs_intranet/produktgruppe_i/formulare/beeg-antrag/2021_09_anlage_n_mit_info_.pdf

I find this part a bit confusing:

The Lohnsteuerklasse is always set on a yearly basis; if it changes with the start of the calendar year a child is born, the date of birth matters. Up to June, the Lohnsteuerklasse from the previous calendar year will be relevant; for July or later, the Lohnsteuerklasse from the current calendar year will be relevant.

I would simply delete it. Eventually, also the Steuerklasse is a choice of the data preparer.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depends on the dataset, I guess 😄

I don't care either way, your call @MImmesberger, and then go ahead and merge!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left it in there because it helped me to understand the purpose of the paragraph. I just added a "for example" to make clear that this reasoning also applies to the other variables.

@MImmesberger MImmesberger merged commit 8843fcc into main Sep 11, 2024
@MImmesberger MImmesberger deleted the some_elterngeld_fixes branch September 11, 2024 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Add last year's income as an input variable for Elterngeld

6 participants